﻿
@{
    ViewBag.Title = "修改角色";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using Mate.Framework.Extensions
@model Mate.Db.Model.System.roles
@section styles{

}
@section scripts{
    <script src="~/bootstrap/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
    <script src="~/bootstrap/plugins/jquery-validation/dist/additional-methods.min.js"></script>
    <script src="~/bootstrap/scripts/custom/form-validation.js" charset="gbk"></script>

    <script src="~/js/admin.js?v=1.0"></script>
    <script language="javascript" type="text/javascript">
    $(function () {
        var rules = {
            role_name: {
                required: true
            },
            order_by: {
                required: true,
                digits: true
            }
        };
        FormValidation.BasicValidation(rules);

    });
    </script>
}

<ul class="page-breadcrumb breadcrumb">
    <li>
        <a href="@Url.Action("Index","Roles")">
            角色管理
        </a>
        <i class="fa fa-angle-right"></i>
    </li>
    <li>
        修改角色
    </li>
</ul>

<div class="row">
    <div class="col-md-12">

        <div class="portlet-body form">
            <!-- BEGIN FORM-->
            @using (Html.BeginForm("Edit", "Roles", FormMethod.Post, new { @class = "form-horizontal", @id = "form_ff_validation", @novalidate = "novalidate" }))
            {
                <div class="form-body">
                    @Html.TextFor("角色名称", "role_name", value: Model.role_name)
                    @Html.TextFor("排序", "order_by", value: Model.order_by.ToString())

                </div>
                <div class="form-actions fluid">
                    <div class="col-md-offset-3 col-md-9">
                        @Html.HiddenFor(x=>x.id)
                        <button class="btn green" type="button" onclick="admin.AddSubmit('@Url.Action("Index")')"> 提交 <i class="fa fa-check"></i> </button>
                        <a class="btn default" role="button" href="@Url.Action("Index")"> 返回 <i class="fa fa-reply"></i></a>
                    </div>
                </div>
            }
            <!-- END FORM-->
        </div>
    </div>
    <!-- END VALIDATION STATES-->
</div>
